import { usersService } from './users/user.service';
import { usersController } from './users/users.controller';
import { usersModule } from './users/users.module';

import { users } from './users/users.entity';
import { dogesService } from './dogs/doges.service';
import { dogesController } from './dogs/doges.controller';
import { dogesModule } from './dogs/doges.module';

import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { CatsController } from './cats/cats.controller';
import { TypeOrmModule } from '@nestjs/typeorm';
import { doges } from './dogs/doges.entity' ;
import { AuthController } from './auth/auth.controller';
import { AuthModule } from './auth/auth.module';

@Module({
  imports: [TypeOrmModule.forRoot({
    type: 'mysql',
    host: '192.168.1.110',
    username: 'root',
    password: 'yh20181013',
    database: 'nestjs',
    entities: [doges,users],
    synchronize: true,
    logging:true
  }),dogesModule,usersModule, AuthModule],
  controllers: [AppController, CatsController,dogesController,usersController, AuthController],
  providers: [AppService,dogesService,usersService],
})
export class AppModule {}
